home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Almathera Ten Pack 3: CDPD 3
/
Almathera Ten on Ten - Disc 3: CDPD3.iso
/
scope
/
076-100
/
scopedisk89
/
typetut
/
rancon.bas
< prev
next >
Wrap
BASIC Source File
|
1995-03-19
|
970b
|
43 lines
5 PRINT "NOW RUN THE VAROUS PROGRAMS"
7 STOP
10 OPEN "I",#1,"LESSONS"
20 OPEN "R",#2,"LESRAN",80:FIELD #2,80 AS R$
25 OPEN "O",#3,"LESST"
30 COUNT=0:START=1:LES=0
40 IF EOF(1) THEN 100
50 LINE INPUT #1,A$
60 COUNT=COUNT+1
70 IF LEFT$(A$,4)<>"$$$$" THEN 80
71 REM NEW LESSON
75 LES=LES+1
76 PRINT #3,LES,COUNT
78 PRINT "LESSON ";LES,COUNT
80 GOSUB 200 'TRIM LINE
85 B$=B$+">" 'PUT IN TRAILING THINGY
90 LSET R$=B$
95 PUT #2,COUNT
98 GOTO 40
100 REM ALL LINES IN
120 RESET:END
200 REM TRIM LINE
210 A=LEN(A$)
220 FOR X=A TO 1 STEP -1
230 IF MID$(A$,X,1)<>" " THEN 250
240 NEXT X
250 B$=LEFT$(A$,X)
260 RETURN
300 REM PRINT OUT CONTENTS OF RANDOM FILE
310 OPEN "R",#2,"LESRAN",80:FIELD #2,80 AS R$
320 FOR X=1 TO 1000
330 GET #2,X
340 LPRINT X,R$
350 NEXT X
360 END
400 REM PRINT OUT CONTENTS OF LESSON START FILE
410 OPEN "I",#3,"LESST":COUNT=0
420 IF EOF(3) THEN 460
430 INPUT #3,LES,START:COUNT=COUNT+1
440 LPRINT "C=";COUNT,"L=";LES,"S=";START
450 GOTO 420
460 END